package org.spring.learn.demo.annotation.configures.componentscan;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.util.Arrays;

public class MyTest {

    @Test
    public void test(){
        // Ioc 控制反转
        ApplicationContext app = new AnnotationConfigApplicationContext(MyConfig.class);

        String[] beanNames = app.getBeanDefinitionNames();

        System.out.println(Arrays.toString(beanNames)
                .replaceAll("\\[|\\]", "")
                .replaceAll(",", "\n")
        );
    }
}
